// Auteur : Simon-Pierre Boucher — contact@spboucher.ai
import { notFound } from "next/navigation";
import { estimateByUnitId } from "@/lib/estimator";
import ResultView from "@/components/ResultView";

export const dynamic = "force-dynamic";

export default async function EstimationPage({
  params,
}: {
  params: Promise<{ id: string }>;
}) {
  const { id } = await params;
  const data = estimateByUnitId(decodeURIComponent(id));
  if (!data) notFound();
  return <ResultView data={data} />;
}
